public class Quirks {

    public static void main(String[] args) {

        Quirks quirks = new Quirks();
        quirks.unboxing();
    }

    /**
     * Unboxing quirk
     * SCJP Java 6 p. 246
     */
    public void unboxing(){

        Integer a1 = 15;
        Integer b1 = 15;

        Integer a2 = 150;
        Integer b2 = 150;

        System.out.println("Integer a1 = " + a1);
        System.out.println("Integer b1 = " + b1);
        System.out.println("Integer a2 = " + a2);
        System.out.println("Integer  b2 = " + b2);
        System.out.println("(a1 == b1) = " + (a1 == b1)); // true
        System.out.println("(a2 == b2) = " + (a2 == b2)); // false
    }

}
